<!-- toaster directive -->
<toaster-container toaster-options="{'position-class': 'toast-top-right', 'close-button':true}"></toaster-container>
<!-- / toaster directive -->

<!-- 导航条 -->
<div class="bg-white bread-crumb">
    <ul class="breadcrumb b-a m-b-n-xs lter b-b wrapper-md">
        <li><a ui-sref="main.tpl.homePage"><i class="fa fa-home"></i> 首页</a></li>
        <li><a ui-sref="main.zzy.creative.list">创意管理</a></li>
        <li class="active" ng-bind="title"></li>
    </ul>
</div>

<!-- 内容区域 -->
<div class="wrapper-md content">
    <div class="panel panel-default">
        <!-- 头部 -->
        <div class="panel-heading font-bold">{{title}}
            <a class="btn btn-sm btn-icon btn-rounded btn-default pull-right m-t-n-xs" ui-sref="main.zzy.creative.list">
                <i class="text-md fa fa-times text-muted"></i></a>
        </div>

        <!--表单-->
        <div class="panel-body">
            <form class="form-horizontal" name="user_form">
                <div class="form-group" style="overflow: hidden">
                    <div class="row" align="right" style="float:right;width: 500px">
                        <label class="col-sm-2 control-label pull-right"></label>
                        <label ng-if="record.status=='2'" class="">
                            <button class="btn btn-success" ng-click="approve(record.id,3)">审核通过</button>
                        </label>
                        <label ng-if="record.status=='2'" class="">
                            <button class="btn btn-danger" ng-click="approve(record.id,4)">审核失败</button>
                        </label>
                    </div>
                </div>


                <div class="form-group">
                    <div class="row">
                        <label class=" col-sm-3 control-label">创意名称:</label>
                        <label class="col-sm-3 col-lg-2" style="padding-top:3px;">{{record.creativeName}}</label>
                        <label class="col-lg-2 col-sm-3 control-label">计划id:</label>
                        <label class="col-sm-3 col-lg-2" style="padding-top:3px;">{{record.planId}}</label>

                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <div class="row">
                        <label class="col-sm-3  control-label">创意分类:</label>
                        <label class="col-sm-3 col-lg-2" style="padding-top:3px;">
                            <span ng-if="record.creativeType=='1'">pc静态创意</span>
                            <span ng-if="record.creativeType=='2'">PC视频创意</span>
                            <span ng-if="record.creativeType=='3'">PC信息流创意</span>
                            <span ng-if="record.creativeType=='4'">移动静态创意</span>
                            <span ng-if="record.creativeType=='5'">移动视频创意</span>
                            <span ng-if="record.creativeType=='6'">移动信息流创意</span>
                        </label>
                        <label class="col-lg-2 col-sm-3 control-label">格式:</label>
                        <label class="col-sm-3 col-lg-2" style="padding-top:3px;">
                            <span ng-if="record.resourceType=='0'">PC静态IMAGE</span>
                            <span ng-if="record.resourceType=='1'">PC静态FLASH</span>
                            <span ng-if="record.resourceType=='2'">移动静态IMAGE</span>
                            <span ng-if="record.resourceType=='3'">移动静态GIF</span>
                            <span ng-if="record.resourceType=='9'">PC/移动视频JPG</span>
                            <span ng-if="record.resourceType=='10'">PC/移动视频GIF</span>
                            <span ng-if="record.resourceType=='11'">PC视频SWF</span>
                            <span ng-if="record.resourceType=='12'">PC/移动视频MP4</span>
                            <span ng-if="record.resourceType=='13'">PC视频FLV</span>
                        </label>


                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <!--  <div class="form-group">
                      <div class="row">
                          <label class="col-sm-3  control-label">展现类型:</label>
                          <label class="col-sm-3 col-lg-2" style="padding-top:3px;">
                              <span ng-if="record.adVideoType=='1'">暂停视频创意</span>
                              <span ng-if="record.adVideoType=='2'">贴片视频创意</span>
                          </label>

                          <label class="col-lg-2  control-label">创意尺寸编号:</label>
                          <label class="col-sm-3 col-lg-2">{{record.creativeSize}}</label>
                      </div>
                  </div>
                  <div class="line line-dashed b-b line-lg pull-in"></div>-->
                <div class="form-group">
                    <div class="row">
                        <label class="col-sm-3  control-label">创意尺寸:</label>
                        <label class="col-sm-3 col-lg-2" style="padding-top:3px;">{{record.creativeSizeValue}}</label>

                        <label class="col-lg-2 col-sm-3 control-label">资源文件地址:</label>
                        <label class="col-sm-3 col-lg-2" style="padding-top:3px;">
                            <a href="" class="colorTd" ng-click="onPreview(record)">预览</a>
                        </label>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <div class="row">
                        <label class="col-sm-3  control-label">展现类型:</label>
                        <label class="col-sm-3 col-lg-2" style="padding-top:3px;">
                            <span ng-if="record.adVideoType=='1'">暂停视频创意</span>
                            <span ng-if="record.adVideoType=='2'">贴片视频创意</span>
                            <span ng-if="record.adVideoType=='4'">移动静态创意</span>
                            <span ng-if="record.adVideoType=='5'">移动视频创意</span>
                        </label>
                        <label class="col-lg-2 col-sm-3 control-label">创意目标地址:</label>
                        <label class="col-sm-5 col-lg-5" style="padding-top:3px;">{{record.targetUrl}}</label>

                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"
                     ng-show="record.creativeType==2|| record.creativeType==5"></div>

                <div class="form-group" ng-show="record.creativeType==2|| record.creativeType==5">
                    <div class="row">
                        <label class=" col-sm-3 control-label">视频时长/秒:</label>
                        <label class="col-sm-3 col-lg-2" style="padding-top:3px;">{{record.duration}}</label>

                        <label class="col-lg-2 col-sm-3 control-label">视频码率（Kbps）:</label>
                        <label class="col-sm-3 col-lg-2" style="padding-top:3px;">{{record.dataRate}}</label>

                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <div class="row">
                        <label class="col-sm-3 control-label">申请时间:</label>
                        <label class="col-sm-3 col-lg-2" style="padding-top:3px;">{{record.createTime | date :
                            'yyyy-MM-dd HH:mm:ss'}}</label>

                        <label class="col-sm-2 control-label">审核时间:</label>
                        <label class="col-sm-3 col-lg-2" style="padding-top:3px;">{{record.updateTime | date :
                            'yyyy-MM-dd HH:mm:ss'}}</label>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>

                <div class="row">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">平台审核状态:</label>
                        <label class="col-sm-3 col-lg-2" style="padding-top:3px;">
                            <span ng-if="record.status=='1'" class="text-danger">未提交</span>
                            <span ng-if="record.status=='2'" class="text-danger">待审核</span>
                            <span ng-if="record.status=='3'" class="text-success">审核通过</span>
                            <span ng-if="record.status=='4'" class="text-success">审核失败</span>
                            <span ng-if="record.status=='5'" class="text-success">取消</span>
                            <span ng-if="record.status=='6'" class="text-success">暂停</span>
                            <span ng-if="record.status=='7'" class="text-success">作废</span>
                        </label>

                        <label class="col-sm-2 control-label">平台审核失败原因:</label>
                        <label class="col-sm-3 col-lg-2" style="padding-top:3px;">{{record.approveReason}}</label>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <div class="row">

                        <label class="col-sm-3 control-label">智子云审核状态:</label>
                        <label class="col-sm-3 col-lg-2" style="padding-top:3px;">
                            <span ng-if="record.zzyStatus=='0'" class="text-danger">未提交</span>
                            <span ng-if="record.zzyStatus=='1'" class="text-danger">待审核</span>
                            <span ng-if="record.zzyStatus=='2'" class="text-success">审核通过</span>
                            <span ng-if="record.zzyStatus=='3'" class="text-success">审核失败</span>
                        </label>

                        <label class="col-sm-2 control-label">智子云审核内容:</label>
                        <label class="col-sm-3 col-lg-2" style="padding-top:3px;">{{record.zzyVerifyMessage}}</label>

                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group" ng-show="record.mobileClickType!=null && record.mobileCbundle!=null">
                    <div class="row">
                        <!--广告类型-->
                        <label class=" col-sm-3 control-label">移动点击类型:</label>
                        <label class="col-sm-3 col-lg-2" style="padding-top:3px;">
                            <span ng-if="record.mobileClickType=='2'">打开浏览器</span>
                            <span ng-if="record.mobileClickType=='3'">下载App</span>
                            <span ng-if="record.mobileClickType=='4'">跳转到AppStore</span>
                        </label>
                        <!--状态-->
                        <label class="col-lg-2 col-sm-3 control-label">点击下载包名:</label>
                        <label class="col-sm-3 col-lg-2" style="padding-top:3px;">{{record.mobileCbundle}}</label>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"
                     ng-show="record.appname!=null && record.appDesc!=null"></div>
                <div class="row" ng-show="record.appname!=null && record.appDesc!=null">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">应用名称:</label>
                        <label class="col-sm-3 col-lg-2" style="padding-top:3px;">{{record.appname}}</label>

                        <label class="col-lg-2 col-sm-3 control-label">应用介绍:</label>
                        <label class="col-sm-3 col-lg-2" style="padding-top:3px;">{{record.appDesc}}</label>

                        <!--  <label ng-show="record.appPackageSize!=null" class="col-sm-2 control-label">应用大小:</label>
                          <label ng-show="record.appPackageSize!=null" class="col-sm-3 col-lg-2" style="padding-top:3px;">{{record.appPackageSize}}</label>-->
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"
                     ng-show="record.appname!=null && record.appDesc!=null"></div>
                <div class="row" ng-show="record.appname!=null && record.appDesc!=null">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">应用大小:</label>
                        <label class="col-sm-3 col-lg-2" style="padding-top:3px;">{{record.appPackageSize}}</label>

                        <div class="cover" ng-show="firstApply">
                            <div class="firstApplyWrap">
                                <div class="clear"><i class="iconfont closeBtn noselect" ng-click="firstApply=false">
                                    &#xe608;</i></div>
                                <div class="title"><textarea placeholder="请输入审核失败的原因......" class="form-control"
                                                             rows="5"
                                                             id="remark"></textarea>
                                    <div class="modal-footer">
                                        <button type="button" class="btn btn-default" ng-click="firstApply=false"
                                                data-dismiss="modal">取消
                                        </button>
                                        <button type="button" class="btn btn-primary" ng-click="approve(record.id,4)">确定
                                        </button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <form id="saveReason">
        <div class="modal fade bs-example-modal-lg" tabindex="-1" data-backdrop="static" id="refuseDiv" role="dialog"
             aria-labelledby="gridSystemModalLabelSupply">
            <div class="modal-dialog modal-lg" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title" id="gridSystemModalLabelSupply"><span id="title"></span>审核</h4>
                    </div>
                    <div class="modal-body">
                        <p></p>
                        <div class="row">
                            <label class="col-sm-2 control-label text-right">拒绝原因:</label>
                            <div class="col-sm-4">
                                <input type="text" class="form-control" name="approveReason" maxlength="60"
                                       placeholder="请输入拒绝原因" ng-model="param.approveReason">
                            </div>
                        </div>
                        <p></p>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                        <button type="button" class="btn btn-primary" ng-click="saveApproveReason()">确定</button>
                    </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div><!-- /.modal -->
    </form>
</div>
<!--<div class="preViewWindow" ng-if="_isShow" ng-click="stopShow()">-->
<!--<img ng-src="{{dataUrl}}" ng-if="getFileExt(dataUrl)=='.jpeg'||getFileExt(dataUrl)=='.jpg'||getFileExt(dataUrl)=='.gif'||getFileExt(dataUrl)=='.png'"  class='imgRatio' onmousewheel="angular.element(this).scope().scale(this)">-->
<!--<ng-video src="dataUrl" ng-if="getFileExt(dataUrl)=='.mp4'||getFileExt(dataUrl)=='.swf'"></ng-video>-->
<!--</div>-->
<div class="upWindow" ng-if="_isShow">
    <div class="mediaWrap">
        <span class="videoClose" ng-click="stopShow()"><i class="iconfont closeIcon">&#xe608;</i></span>
        <img ng-src="{{dataUrl}}"
             ng-if="getFileExt(dataUrl)=='.jpeg'||getFileExt(dataUrl)=='.jpg'||getFileExt(dataUrl)=='.gif'||getFileExt(dataUrl)=='.png'"
             class='imgRatio' onmousewheel="angular.element(this).scope().scale(this)">
        <div id="videoWrap">
            <ng-video src="dataUrl" ng-if="getFileExt(dataUrl)=='.mp4'||getFileExt(dataUrl)=='.swf'"></ng-video>
        </div>
    </div>
</div>
<style>
    .addOriginality {
        width: 70px;
        height: 32px;
        border: 1px solid #F7B44D;
        background: #fff;
        color: #F7B44D;
        border-radius: 3px;
        margin-right: 30px;
    }

    .colorTd {
        color: #84A6FF;
    }

    .subText {
        height: 32px;
        line-height: 32px;
        margin-top: 4px;
    }

    .lzCancel {
        line-height: 52px;
        background: #fff !important;
        border: 1px solid #ffb135 !important;
        color: #ffb135 !important;
    }

    .button input {
        width: 150px;
        height: 52px;
        border-radius: 26px;
        background: #ffb135;
        text-align: center;
        color: #fff;
        cursor: pointer;
        border: 0;
        outline: 0;
        margin: 0 10px;
    }

    .center {
        text-align: center;
        margin-top: 40px !important;
    }

    .width450 {
        width: 450px;
    }

    .previewWrap1 .test {
        padding: 13px 13px;
    }

    .adsense-detail {
        width: 50%;
        min-width: 800px;
        left: 50%;
        transform: translateX(-50%);
        -webkit-transform: translateX(-50%);
        -moz-transform: translateX(-50%);
        -ms-transform: translateX(-50%);

    }

    .upload .button {
        margin-left: 0;
    }

    .button span {
        width: 150px;
        height: 52px;
        line-height: 52px;
        border-radius: 26px;
        background: #ffb135;
        text-align: center;
        color: #fff;
        cursor: pointer;
        border: 0;
        outline: 0;
        margin: 0 10px;
        float: left;
    }

    .upWindow {
        position: fixed;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 10000;
        top: 0;
        left: 0;
    }

    .upWindow .mediaWrap {
        position: absolute;
        left: 50%;
        top: 55%;
        transform: translate(-50%, -50%);
        -webkit-transform: translate(-50%, -50%);
        -o-transform: translate(-50%, -50%);
        -moz-transform: translate(-50%, -50%);
        -ms-transform: translate(-50%, -50%);
    }

    .upload span i {
        color: red;
    }

    #adsense1 tr th {
        height: 50px;
    }

    .subTitle i {
        color: red;
    }

    .media {
        height: 216px;
    }

    .closeIcon {
        color: #ffb135;
        font-size: 30px;
    }

    .videoClose {
        position: absolute;
        right: -40px;
        top: -40px;
        cursor: pointer;
        max-width: 70%;
    }
</style>